
//----------------------------------------------------------------------------
// Copyright (c) 2011 Texas Instruments, Inc.
// This is an unpublished work created in the year stated above.
// Texas Instruments owns all rights in and to this work and
// intends to maintain and protect it as an unpublished copyright.
// In the event of either inadvertent or deliberate publication,
// the above stated date shall be treated as the year of first
// publication. In the event of such publication, Texas Instruments
// intends to enforce its rights in the work under the copyright
// laws as a published work.
//----------------------------------------------------------------------------
// Filename                : monterey_uart.h
//
// Functional Description  : Monterey UART public interface
//
// Creation Date           : 2-Feb-2011
//
//----------------------------------------------------------------------------

#ifndef MONTEREY_UART_H_
#define MONTEREY_UART_H_

#define UART_MESSAGE_SIZE		5

extern void uart_message_handler();										// Callback to user application when data ready

extern unsigned char uart_rx_buffer[];									// Buffer where last message resides

extern unsigned char uart_receiving_message;							// Currently in middle of receiving message

void uart_init();														// Must call to configure and enable UART
void uart_transmit(unsigned char *data, unsigned char num_bytes);		// Call to transmit data out UART
void uart_receive(unsigned char *data, unsigned char num_bytes_in_msg);	// Call to configure where to put data on Rx and how much of it to expect 
void uart_rx_reset();													// Call to reset RX state machine
void uart_tick_1ms();													// Called from user application at 1ms tick for timeout and other processing

#endif /*MONTEREY_UART_H_*/
